In recent years, MPEG (Moving Picture Expert Group), H.263, and the like have been widely used as high-performance compression coding schemes for images in the fields of broadcasting, communication, and storage. In the MPEG or H.263 scheme, coding is carried out by removing redundancies in the spatial direction and in the temporal direction from an image. Hereinafter, the outline of the MPEG scheme will be described.
First of all, in order to remove a redundancy in the spatial direction, which is included in image information, discrete cosine transform (hereinafter referred to as DCT) and quantization are used. To be specific, an input image is divided into units called blocks each comprising 8×8 pixels and, thereafter, DCT is performed on each block to convert it into coefficients (DCT coefficients) in the frequency domain. Then, quantization is performed on the DCT coefficients. The quantization is a process of dividing the DCT coefficients by using both of a quantization matrix having values corresponding to the respective frequencies in the DCT domain, and a quantization step. By the quantization, the frequency components having relatively small DCT coefficients become “0”. Since, in a general image signal, the energy concentrates on the low frequency domain, high-frequency components are removed by this process. However, since visual characteristics of human beings have lower ability of discrimination for higher frequencies, degradation in image quality due to quantization is less conspicuous as the quantization step used for quantization is smaller.
On the other hand, in order to remove a redundancy in the temporal direction, motion compensation is employed. In motion compensation, an area nearest to a, reference image is selected using a macroblock comprising 16×16 pixels as a unit of motion compensation. Then, a difference in values between the selected area and the reference image is coded. Since this difference value is approximately “0” when the motion is not very fast, the temporal redundancy can be removed.
Generally, when the bit rate is high, i.e., when the compression ratio is small, degradation in image quality is hardly conspicuous in the MPEG scheme. However, when the bit rate becomes lower, i.e., when the compression ratio is increased, degradation in image quality, i.e., coding noise, begins to be conspicuous. There is block distortion as typical coding noise in the MPEG scheme.
Block distortion is a phenomenon in which the boundaries of each block sharply look like a tile. This is caused by that an image signal in a block has only low frequency components, and the values of the low frequency components differ from those of adjacent blocks.
Block distortion is different from conventional analog noise in that it is considerably conspicuous as degradation in image quality. There have been proposed several methods for removing block distortion. For example, Japanese Published Patent Application No. Hei. 11-275584 discloses a method for removing block distortion. This literature discloses a method of converting a motion vector of a target macroblock into a motion vector per frame, and changing the characteristics of a filter to be applied to an image after decoding, according to the size of the converted motion vector.
In the conventional method described above, a frequency response of a low-pass filter, i.e., a cutoff frequency, is determined according to the size of the motion vector. Then, the decoded image is subjected to filtering using the determined filter to remove block distortion. At this time, the frequency response of the filter should be determined so that the cutoff frequency is lowered as the motion vector becomes larger. However, even when the motion vector is large, degradation in image quality occurs when an area having high-frequency components is subjected to filtering.
Further, in the conventional method, the volume of processing per block for detecting block distortion is constant independently of the resolution of the image signal. That is, whether the resolution of the image signal is high or low, the volume of processing is the same. Therefore, as the resolution of the image signal becomes higher, the total volume of processing increases.